﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace logicunivesityinventorystore
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Session["UserName"] = User.Identity.Name.ToString();

            if (User.IsInRole("Employee") || User.IsInRole("Representative") || User.IsInRole("DepartmentHead"))
            {
                Response.Redirect("~/Department/HomePage_Department.aspx");
                //   MessageBox.Show("hello admin");
            }
            if (User.IsInRole("StoreClerk") || User.IsInRole("StoreManager") || User.IsInRole("StoreSupervisor"))
            {
                Response.Redirect("~/Store/HomePage_Store.aspx");
            }
        }
    }
}